﻿@model SIG.DAL.Dapper.Model.Team

<div class="col-sm-4 col-md-3 col-lg-2 item-container" id="@string.Format("container{0}",Model.Id)">

    <div class="panel panel-default">
        <div class="panel-body text-center">
            <a href="#">
                <img class="media-object img-circle img-responsive" style="margin:0 auto;" src="@Model.PhotoUrl" alt="...">
            </a>
            <h3>
                @Model.Name
            </h3>
            <p>
                @Model.Post
            </p>
        </div>
        <div class="panel-footer text-center">
            @if (Model.Active)
            {
                <a href="#" data-url="@Url.Action("IsActive", new {id = Model.Id})" class="active-item btn btn-default btn-sm" title="激活" data-action="锁定">
                    <i class="fa fa-check text-success"></i>
                </a>
            }
            else
            {
                <a href="#" data-url="@Url.Action("IsActive", new {id = Model.Id})" class="active-item btn btn-default btn-sm" title="锁定" data-action="激活">
                    <i class="fa fa-remove text-danger"></i>
                </a>
            }

            @Ajax.RawActionLink("<i class='fa fa-edit'></i>",
                        "Edit", "Team",
                        new { id = Model.Id },
                        new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "edit-container", OnComplete = "onAjaxComplete", OnSuccess = "OnSuccessLink" },
                        new { @class = "btn btn-primary btn-sm", title = Buttons.Edit })


            <a href="#" data-url="@Url.Action("Delete", new {id = Model.Id})" class="btn btn-danger btn-sm delete-item" title="@Buttons.Delete">
                <i class="fa fa-trash-o fa-fw"></i>
            </a>
        </div>
       
    </div>
</div>
